/*
 PureMVC AS3 / Flex Demo - Slacker 
 Copyright (c) 2008 Clifford Hall <clifford.hall@puremvc.org>
 Your reuse is governed by the Creative Commons Attribution 3.0 License
 */
package mvc.view
{
	import flash.events.Event;
	import mx.events.FlexEvent;
	
	import mvc.view.components.AboutView;
	import org.puremvc.as3.patterns.mediator.Mediator;

	public class AboutViewMediator extends Mediator
	{
		public static const NAME:String =	'AboutViewMediator';
		public function AboutViewMediator( viewComponent:Object ){super( NAME, viewComponent );}
		override public function onRegister():void
		{
//			aboutView.message.text = "Hello from the newly registered "+NAME;
			aboutView.addEventListener(FlexEvent.HIDE, onHide);
		}
		protected function onHide(event:Event):void
		{
//			aboutView.message.text = "Hi there, its your old friend "+NAME;
			aboutView.removeEventListener(FlexEvent.HIDE, onHide);
		}   
        protected function get aboutView():AboutView{return viewComponent as AboutView;}
	}
	
}